import * as types from './mutation-types'

export default {
	[types.UPDATE_EXAMINE](state, payload) {
		state.examine = payload;
	},
	[types.UPDATE_NICK_EDIT](state, payload){
		state.nickEdit = payload;
	},
	[types.UPDATE_MINE_QUAN](state, payload){
		state.mineQuan = payload;
	},
	[types.UPDATE_MINE_RANGE](state, {min=1,max=1000}){
		state.mineRange = {min,max};
	},
	[types.UPDATE_RECHARGEABLE](state, payload){
		state.rechargeable = payload;
	},
	[types.UPDATE_CASH_MIN](state, payload){
		state.cashMin = payload;
	},
	[types.UPDATE_WITHDRAW](state, payload){
		state.withdraw = payload;
	},
	[types.UPDATE_RED_MAX](state, payload){
		state.redMax = payload;
	},
	[types.UPDATE_BREAKTIME](state, payload){
		state.breaktime = payload;
	},
	resetTabbar({tabbar}){
		tabbar.forEach((item)=>{
			item.load = false
		})
	}
}
